﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace JeanFish.AnA.OAuth2
{
    public abstract class ProtocolEndpoint
    {
        public ProtocolEndpoint(string endpointUri)
        {
            try
            {
                this.URI = new Uri(endpointUri);
            }
            catch (FormatException uriFormatEx)
            {
                throw new MalformedSyntaxException(Syntaxes.EndpointURISyntaxName, Resources.Exception_EndpointURIMalformed, uriFormatEx);
            }
        }
        public virtual Uri URI { get; private set; }
    }
    public class AuthorizationEndpoint : ProtocolEndpoint
    {
        public AuthorizationEndpoint(string endpointUri)
            : base(endpointUri) { }
    }
    public class TokenEndpoint : ProtocolEndpoint
    {
        public TokenEndpoint(string endpointUri)
            : base(endpointUri) { }
    }
}
